package xjggb.algorithm.排序;


import xjggb.algorithm.排序.sort.bubble.BubbleSort1;
import xjggb.algorithm.排序.sort.heap.HeapSort;
import xjggb.algorithm.排序.sort.insert.InsertSort1;
import xjggb.algorithm.排序.sort.insert.InsertSort2;
import xjggb.algorithm.排序.sort.merge.Merge;
import xjggb.algorithm.排序.sort.selection.SelectionSort;
import xjggb.algorithm.排序.tools.Integers;

public class DemoApplication {
    public static void main(String[] args) {


        sho6(Integers.random(1000,1,100000));

    }

    /*
    * 归并排序
    * */
    public  static void sho6(Integer ...array1){
        Merge<Integer> tInsertSort = new Merge<>();
        tInsertSort.sort(array1);
        System.out.println("Merge = " + tInsertSort);
    }

    /*
     * 插入排序
     * */
    public static void show5(Integer ...array1){
        InsertSort2<Integer> tInsertSort = new InsertSort2<>();
        tInsertSort.sort(array1);
        System.out.println("tInsertSort = " + tInsertSort);
    }

    /*
    * 插入排序
    * */
    public static void show4(Integer ...array1){
        InsertSort1<Integer> tInsertSort = new InsertSort1<>();
        tInsertSort.sort(array1);
        System.out.println("tInsertSort = " + tInsertSort);
    }

    /*
    * 堆排序
    * */
    public static void show3(Integer ...array1){
        HeapSort<Integer> integerHeapSort = new HeapSort<Integer>();
        integerHeapSort.sort(array1);
        System.out.println("integerHeapSort = " + integerHeapSort);

    }


    /*
    * 选择排序
    * */
    public static void show2(Integer ...array1){
        SelectionSort<Integer> integerSelectionSort = new SelectionSort<Integer>();
        integerSelectionSort.sort(array1);

        System.out.println("integerSelectionSort = " + integerSelectionSort);

    }

    /*
    * 冒泡排序测试
    * */
    public static void show1(Integer ...array1){

        BubbleSort1<Integer> bubbleSort1 = new BubbleSort1();


        bubbleSort1.sort(array1);



        System.out.println(
                "bubbleSort1 = " + bubbleSort1

        );
    }



}
